<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>学生端-任务页面</title>
    <jsp:include page="../header.jsp"></jsp:include>
</head>
<body>
<div class="container">
    <hr>
    <div class="row">
        <div class="col-xs-2 col-md-3">
            <nav aria-label="...">
                <ul class="pager">
                    <li class="previous"><a href="${pageContext.request.contextPath}/student/queryCourseServlet"><span aria-hidden="true">&larr;</span>返回</a></li>
                </ul>
            </nav>
        </div>
        <div class="col-xs-8 col-md-6">
            <div class="list-group">
                <i style="cursor: pointer;background: #7b9e31"></i>
                <strong>进行中：</strong><br>
                <c:forEach items="${requestScope.ongoing_task}" var="task">
                    <a href="${pageContext.request.contextPath}/student/signinServlet?task_num=${task.tnum}" class="list-group-item ">
                        <h4 class="list-group-item-heading">
                            ${task.tname}
                        </h4>
                        <p class="list-group-item-text">
                            发布于：<fmt:formatDate value="${task.release_time}" pattern="yyyy-MM-dd hh:mm:ss"/>
                        </p>
                        <p class="list-group-item-text">
                            签到时段：<fmt:formatDate value="${task.start_time}" pattern="yyyy-MM-dd hh:mm:ss"/>~<fmt:formatDate value="${task.end_time}" pattern="yyyy-MM-dd hh:mm:ss"/>
                        </p>
                    </a>
                    <br>
                </c:forEach>
                <hr>
                <strong>已结束：</strong><br>
                <c:forEach items="${requestScope.end_task}" var="task">
                    <a href="${pageContext.request.contextPath}/student/signinServlet?task_num=${task.tnum}" class="list-group-item ">
                        <h4 class="list-group-item-heading">
                                ${task.tname}
                        </h4>
                        <p class="list-group-item-text">
                            发布于：<fmt:formatDate value="${task.release_time}" pattern="yyyy-MM-dd hh:mm:ss"/>
                        </p>
                        <p class="list-group-item-text">
                            签到时段：<fmt:formatDate value="${task.start_time}" pattern="yyyy-MM-dd hh:mm:ss"/>~<fmt:formatDate value="${task.end_time}" pattern="yyyy-MM-dd hh:mm:ss"/>
                        </p>
                    </a>
                    <br>
                </c:forEach>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../footer.jsp"></jsp:include>
</body>
</html>
